using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace RugbyClubWpf.Models
{
    /// <summary>
    /// Represents a match in the rugby club.
    /// </summary>
    public class Match
    {
        /// <summary>
        /// Gets or sets the unique identifier for the match.
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int MatchId { get; set; }

        /// <summary>
        /// Gets or sets the opponent team of the match.
        /// </summary>
        public string Opponent { get; set; }

        /// <summary>
        /// Gets or sets the date of the match.
        /// </summary>
        public DateTime Date { get; set; }

        /// <summary>
        /// Gets or sets the location of the match.
        /// </summary>
        public string Location { get; set; }

        /// <summary>
        /// Gets or sets the coach ID associated with the match.
        /// </summary>
        public int CoachId { get; set; }

        /// <summary>
        /// Gets or sets the coach associated with the match.
        /// </summary>
        [ForeignKey("CoachId")]
        public Coach Coach { get; set; }
    }
}


